
package com.wobaby.vo;

import java.util.Collection;
import java.util.Date;

import com.wobaby.util.RenditionUtil;

// Referenced classes of package com.wobaby.appserver.persistence:
//            PartitionableVO

public class UserGroupVO extends BaseVO
{

    public UserGroupVO()
    {
    }
    
    public UserGroupVO(Integer userGroupID,String userGroupName,Date createDate,Date lastModifiedDate,String comments,String description)
    {
    	this.userGroupID = userGroupID;
    	this.userGroupName = userGroupName;
    	this.createDate = createDate;
    	this.lastModifiedDate = lastModifiedDate;
    	this.comments = comments;
    	this.description = description;
    }
    
    public UserGroupVO(String userGroupName,Date createDate,Date lastModifiedDate,String comments,String description)
    {
    	this.userGroupName = userGroupName;
    	this.createDate = createDate;
    	this.lastModifiedDate = lastModifiedDate;
    	this.comments = comments;
    	this.description = description;
    }
    
    public Collection getUsers()
    {
        return __m_users;
    }

    public void setUsers(Collection users)
    {
        __m_users = users;
        if(users != null)
            __m_userCount = users.size();
        else
            __m_userCount = 0;
    }

    public void setUserCount(int userCount)
    {
        if(__m_users == null)
            __m_userCount = userCount;
    }

    public int getUserCount()
    {
        return __m_userCount;
    }

    public Integer getUserGroupID()
    {
        return userGroupID;
    }

    public void setUserGroupID(Integer userGroupID)
    {
        this.userGroupID = userGroupID;
    }

    public String getUserGroupName()
    {
        return userGroupName;
    }

    public void setUserGroupName(String userGroupName)
    {
        this.userGroupName = userGroupName;
    }


    public Date getCreateDate()
    {
        return createDate;
    }

    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public String getComments()
    {
        return comments;
    }

    public void setComments(String comments)
    {
        this.comments = comments;
    }

    public String getDescription()
    {
        return description;
    }

    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getUserGroupCustom1()
    {
        return userGroupCustom1;
    }

    public void setUserGroupCustom1(String userGroupCustom1)
    {
        this.userGroupCustom1 = userGroupCustom1;
    }

    public String getUserGroupCustom2()
    {
        return userGroupCustom2;
    }

    public void setUserGroupCustom2(String userGroupCustom2)
    {
        this.userGroupCustom2 = userGroupCustom2;
    }

    public String getUserGroupCustom3()
    {
        return userGroupCustom3;
    }

    public void setUserGroupCustom3(String userGroupCustom3)
    {
        this.userGroupCustom3 = userGroupCustom3;
    }

    public String getUserGroupCustom4()
    {
        return userGroupCustom4;
    }

    public void setUserGroupCustom4(String userGroupCustom4)
    {
        this.userGroupCustom4 = userGroupCustom4;
    }

    public String getUserGroupCustom5()
    {
        return userGroupCustom5;
    }

    public void setUserGroupCustom5(String userGroupCustom5)
    {
        this.userGroupCustom5 = userGroupCustom5;
    }

    public String getUserGroupCustom6()
    {
        return userGroupCustom6;
    }

    public void setUserGroupCustom6(String userGroupCustom6)
    {
        this.userGroupCustom6 = userGroupCustom6;
    }

    public Date getLastModifiedDate()
    {
        return lastModifiedDate;
    }

    public void setLastModifiedDate(Date lastModifiedDate)
    {
        this.lastModifiedDate = lastModifiedDate;
    }

    public String toString()
    {
        StringBuffer str = new StringBuffer(250);
        str.append('{');
        str.append("userGroupID=").append(userGroupID);
        str.append(" userGroupName=").append(userGroupName);
        str.append(" createDate=").append(createDate);
        str.append(" comments=").append(comments);
        str.append(" description=").append(description);
        str.append(" userGroupCustom1=").append(userGroupCustom1);
        str.append(" userGroupCustom2=").append(userGroupCustom2);
        str.append(" userGroupCustom3=").append(userGroupCustom3);
        str.append(" userGroupCustom4=").append(userGroupCustom4);
        str.append(" userGroupCustom5=").append(userGroupCustom5);
        str.append(" userGroupCustom6=").append(userGroupCustom6);
        str.append(" lastModifiedDate=").append(lastModifiedDate);
        str.append('}');
        return str.toString();
    }

    public boolean equals(Object pOther)
    {
        if(!(pOther instanceof UserGroupVO))
            return false;
        UserGroupVO that = (UserGroupVO)pOther;
        if(!RenditionUtil.eq(userGroupID, that.userGroupID))
            return false;
        if(!RenditionUtil.eq(userGroupName, that.userGroupName))
            return false;
        
        if(!RenditionUtil.eq(createDate, that.createDate))
            return false;
        if(!RenditionUtil.eq(comments, that.comments))
            return false;
        if(!RenditionUtil.eq(description, that.description))
            return false;
        
        if(!RenditionUtil.eq(userGroupCustom1, that.userGroupCustom1))
            return false;
        if(!RenditionUtil.eq(userGroupCustom2, that.userGroupCustom2))
            return false;
        if(!RenditionUtil.eq(userGroupCustom3, that.userGroupCustom3))
            return false;
        if(!RenditionUtil.eq(userGroupCustom4, that.userGroupCustom4))
            return false;
        if(!RenditionUtil.eq(userGroupCustom5, that.userGroupCustom5))
            return false;
        if(!RenditionUtil.eq(userGroupCustom6, that.userGroupCustom6))
            return false;
        
        return RenditionUtil.eq(lastModifiedDate, that.lastModifiedDate);
    }

    public int hashCode()
    {
        int result = 17;
        result = 37 * result + (userGroupID == null ? 0 : userGroupID.hashCode());
        result = 37 * result + (userGroupName == null ? 0 : userGroupName.hashCode());
        result = 37 * result + (createDate == null ? 0 : createDate.hashCode());
        result = 37 * result + (comments == null ? 0 : comments.hashCode());
        result = 37 * result + (description == null ? 0 : description.hashCode());
        result = 37 * result + (userGroupCustom1 == null ? 0 : userGroupCustom1.hashCode());
        result = 37 * result + (userGroupCustom2 == null ? 0 : userGroupCustom2.hashCode());
        result = 37 * result + (userGroupCustom3 == null ? 0 : userGroupCustom3.hashCode());
        result = 37 * result + (userGroupCustom4 == null ? 0 : userGroupCustom4.hashCode());
        result = 37 * result + (userGroupCustom5 == null ? 0 : userGroupCustom5.hashCode());
        result = 37 * result + (userGroupCustom6 == null ? 0 : userGroupCustom6.hashCode());
        result = 37 * result + (lastModifiedDate == null ? 0 : lastModifiedDate.hashCode());
        
        return result;
    }

    static final long serialVersionUID = 2L;
    protected Integer userGroupID;
    protected String userGroupName;
    protected Date createDate;
    protected String comments;
    protected String description;
    public UserGroupVO(Integer userGroupID, String userGroupName,
			Date createDate, String comments, String description,
			Date lastModifiedDate) {
		super();
		this.userGroupID = userGroupID;
		this.userGroupName = userGroupName;
		this.createDate = createDate;
		this.comments = comments;
		this.description = description;
		this.lastModifiedDate = lastModifiedDate;
	}

	protected String userGroupCustom1;
    protected String userGroupCustom2;
    protected String userGroupCustom3;
    protected String userGroupCustom4;
    protected String userGroupCustom5;
    protected String userGroupCustom6;
    protected Date lastModifiedDate;
    protected Collection<UserVO> __m_users;
    protected int __m_userCount;
}